home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / system-tools-backends-2.0 / scripts / StbObject.pm < prev    next >
Encoding:
Perl POD Document  |  2007-03-12  |  1.4 KB  |  48 lines

  1. #-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2. #
  3. # Copyright (C) 2005 Carlos Garnacho
  4. #
  5. # Authors: Carlos Garnacho Parro  <carlosg@gnome.org>
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU Library General Public License as published
  9. # by the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU Library General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Library General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
  20.  
  21. package StbObject;
  22.  
  23. use base qw(Net::DBus::Object);
  24. use Net::DBus::Exporter ($Utils::Backend::DBUS_PREFIX);
  25.  
  26. sub new
  27. {
  28.   my $class   = shift;
  29.   my $path    = shift;
  30.   my $name    = shift;
  31.  
  32.   my $bus = &Utils::Backend::get_bus ();
  33.   my $service = $bus->export_service ($Utils::Backend::DBUS_PREFIX . ".$name");
  34.   my $self = $class->SUPER::new ($service, $path);
  35.  
  36.   bless $self, $class;
  37.   &Utils::Backend::ensure_platform ();
  38.  
  39.   return $self;
  40. }
  41.  
  42. sub reset_counter
  43. {
  44.   &Utils::Backend::initialize_timer (\%Utils::Backend::tool);
  45. }
  46.  
  47. 1;
  48.